#ifndef QPROPERTYTREEVIEW_H
#define QPROPERTYTREEVIEW_H

#include <QTreeView>
#include "QtPropertyExplorerLib.h"

namespace QPE {

class QPropertyTreeViewPrivate;

class QTPROPERTYEXPLORER_DLL_EXPORT QPropertyDelegate;
class QTPROPERTYEXPLORER_DLL_EXPORT QPropertyModel;

class QTPROPERTYEXPLORER_DLL_EXPORT QPropertyTreeView : public QTreeView
{
	Q_OBJECT
public:
	//! Default constructor
	explicit QPropertyTreeView(QWidget *parent = 0);

	//! The destructor, taking a model and setting it to the tree view
	//! \param The model to set as model for this tree view
	QPropertyTreeView(QPropertyModel* model, QWidget *parent = 0);

	//! Destructor
	virtual ~QPropertyTreeView();

	//! Sets the height for each row. Set this to 0 in order to let the standard delegate decide
	void setRowHeight(int height = 0, bool add_to_standard = false);


protected:
	//! This method is called by the constructors to initialize the view
	virtual void init();

	//! protected constructor
	explicit QPropertyTreeView(QPropertyTreeViewPrivate* d, bool init_, QWidget *parent = 0);

	//! The protected data
	QPropertyTreeViewPrivate* d_ptr;
};

}

#endif // QPROPERTYTREEVIEWEEVIEW_H
